#ifndef ENTITY_H
#define ENTITY_H

#include <QObject>
#include <QPixmap>
#include <QVector>
#include <QByteArray>

#include "character.h"

class Entity : public QObject
{
    Q_OBJECT
    Q_PROPERTY(QByteArray data READ data WRITE setData)

public:
    explicit Entity(QObject *parent = 0);
    virtual bool isWalkable(Character::CharType);
    virtual QPixmap pixmap() = 0;
    virtual int type() = 0;
    virtual QByteArray data() const = 0;

signals:
    void popped();
    void taked();

public slots:
    virtual void setData(QByteArray) = 0;

private:
    //quint32 m_walkable;
    QVector<bool> m_walkable;
};

QDataStream &operator<<(QDataStream &, const Entity *);
QDataStream &operator>>(QDataStream &, Entity *);

#endif // ENTITY_H
